import request from '/@/utils/request';

/********** 共用接口 **********/
/**
 * 获取腾讯云COS临时秘钥
 * @param params
 * @returns
 */
export const tencentCosTmp = (params: object) => {
	return request({
		url: '/system/tencent_cos_tmp',
		method: 'post',
		data: params,
	});
};
/**
 * 根据id获取下级地区列表
 */
export const getAreaList = (params: object) => {
	return request({
		url: '/address/get_area_list',
		method: 'get',
		params: params,
	});
};

/********** 系统管理 **********/
/**
 * 轮播图添加
 */
export const bannerAdd = (params: object) => {
	return request({
		url: '/admin/banner_add',
		method: 'post',
		data: params,
	});
};

/**
 * 轮播图列表
 */
export const bannerList = (params: object) => {
	return request({
		url: '/admin/banner_list',
		method: 'get',
		params: params,
	});
};
/**
 * 轮播图信息
 */
export const bannerInfo = (params: object) => {
	return request({
		url: '/admin/banner_info',
		method: 'get',
		params: params,
	});
};
/**
 * 轮播图编辑
 */
export const bannerEdit = (params: object) => {
	return request({
		url: '/admin/banner_edit',
		method: 'post',
		data: params,
	});
};
/**
 * 轮播图删除
 */
export const bannerDelete = (params: object) => {
	return request({
		url: '/admin/banner_delete',
		method: 'post',
		data: params,
	});
};
/**
 * APP版本添加
 */
export const versionUpdateAdd1 = (params: object) => {
	return request({
		url: '/admin/version_update_add1',
		method: 'post',
		data: params,
	});
};
/**
 * APP版本列表
 */
export const versionUpdateList1 = (params: object) => {
	return request({
		url: '/admin/version_update_list1',
		method: 'get',
		params: params,
	});
};
/**
 * APP版本编辑
 */
export const versionUpdateEdit = (params: object) => {
	return request({
		url: '/admin/version_update_edit1',
		method: 'post',
		data: params,
	});
};
/**
 * 版本开关
 */
export const versionSwitch = (params: object) => {
	return request({
		url: '/admin/version_switch',
		method: 'post',
		data: params,
	});
};
/**
 * APP版本删除
 */
export const versionUpdateDelete1 = (params: object) => {
	return request({
		url: '/admin/version_update_delect1',
		method: 'post',
		data: params,
	});
};
/**
 * APP历史版本
 */
export const versionHistory = (params: object) => {
	return request({
		url: '/admin/version_history',
		method: 'get',
		params: params,
	});
};

/**
 * 查询可设置默认经理的用户
 */
export const selectDefaultManager = (params: object) => {
	return request({
		url: '/admin/select_default_manager',
		method: 'get',
		params: params,
	});
};
/**
 * 设置默认经理
 */
export const setDefaultManager = (params: object) => {
	return request({
		url: '/admin/set_default_manager',
		method: 'post',
		data: params,
	});
};
/**
 * 查看默认经理
 */
export const selectDefaultManagerInfo = (params: object) => {
	return request({
		url: '/admin/select_default_manager_info',
		method: 'get',
		params: params,
	});
};

/********** 新闻管理 **********/
/**
 * 新闻添加
 */
export const newsAdd = (params: object) => {
	return request({
		url: '/admin/news_add',
		method: 'post',
		data: params,
	});
};
/**
 * 新闻列表
 */
export const newsList = (params: object) => {
	return request({
		url: '/admin/news_list',
		method: 'get',
		params: params,
	});
};
/**
 * 新闻详情信息
 * @param news_id 新闻id
 */
export const newsDetail = (params: object) => {
	return request({
		url: '/admin/news_detail',
		method: 'get',
		params: params,
	});
};
/**
 * 新闻编辑
 */
export const newsEdit = (params: object) => {
	return request({
		url: '/admin/news_edit',
		method: 'post',
		data: params,
	});
};
/**
 * 新闻删除
 */
export const newsDelete = (params: object) => {
	return request({
		url: '/admin/news_delete',
		method: 'post',
		data: params,
	});
};

/********** 供应商管理 **********/
/**
 * 添加供应商
 */
export const supplierAdd = (params: object) => {
	return request({
		url: '/admin/supplier_add',
		method: 'post',
		data: params,
	});
};
/**
 * 供应商列表
 */
export const supplierList = (params: object) => {
	return request({
		url: '/admin/supplier_list',
		method: 'get',
		params: params,
	});
};
/**
 * 查询供应商
 */
export const supplierSelect = (params: object) => {
	return request({
		url: '/admin/supplier_select',
		method: 'get',
		params: params,
	});
};
/**
 * 导出供应商
 */
export const supplierExport = (params: object) => {
	return request({
		url: '/admin/supplier_export',
		method: 'get',
		params: params,
	});
};
/**
 * 编辑供应商
 */
export const supplierEdit = (params: object) => {
	return request({
		url: '/admin/supplier_edit',
		method: 'post',
		data: params,
	});
};
/**
 * 上传资质文件
 */
export const supplierMchidUploadImg = (params: any) => {
	let formData = new FormData();
	Object.keys(params).forEach((key) => {
		const val = params[key];
		if (Array.prototype.isPrototypeOf(val)) {
			val &&
				val.map((file: string) => {
					formData.append(key, file);
				});
		} else {
			formData.append(key, val);
		}
	});
	return request({
		url: '/admin/supplier_mchid_upload_img',
		method: 'post',
		headers: { 'Content-Type': 'multipart/form-data' },
		data: formData,
	});
};
/**
 * 供应商进件
 */
export const supplierMchidHlbAdd = (params: object) => {
	return request({
		url: '/admin/supplier_mchid_hlb_add',
		method: 'post',
		data: params,
	});
};
/**
 * 修改供应商进件
 */
export const supplierMchidHlbEdit = (params: object) => {
	return request({
		url: '/admin/supplier_mchid_hlb_edit',
		method: 'post',
		data: params,
	});
};
/**
 * 查询供应商子商户图片
 */
export const supplierMchidSeleteImg = (params: object) => {
	return request({
		url: '/admin/supplier_mchid_selete_img',
		method: 'get',
		params: params,
	});
};
/**
 * 查询供应商进件详情
 */
export const supplierMchidHlbSelete = (params: object) => {
	return request({
		url: '/admin/supplier_mchid_hlb_selete',
		method: 'get',
		params: params,
	});
};

/**
 * 【易宝】根据父级编码获取对应的省/市/区
 */
export const yibaoArea = (params: object) => {
	return request({
		url: '/admin/yibao_area',
		method: 'get',
		params: params,
	});
};

/**
 * 【易宝】根据搜索关键字获取对应名称的银行的编码信息
 */
export const yibaoBank = (params: object) => {
	return request({
		url: '/admin/yibao_bank',
		method: 'get',
		params: params,
	});
};

/**
 * 【易宝】获取供应商商户号入网信息
 */
export const supplierMchidInfo = (params: object) => {
	return request({
		url: '/admin/supplier_mchid_info',
		method: 'get',
		params: params,
	});
};
/**
 * 提交供应商商户号入网信息
 */
export const supplierMchidCreate = (params: object) => {
	return request({
		url: '/admin/supplier_mchid_create',
		method: 'post',
		data: params,
	});
};

/********** 振兴目标 **********/
/**
 * 添加振兴区域
 */
export const targetAdd = (params: object) => {
	return request({
		url: '/admin/target_add',
		method: 'post',
		data: params,
	});
};
/**
 * 振兴区域列表
 */
export const targetList = (params: object) => {
	return request({
		url: '/admin/target_list',
		method: 'get',
		params: params,
	});
};
/**
 * 选择商品
 */
export const targetGoodsList = (params: object) => {
	return request({
		url: '/admin/target_goods_list',
		method: 'get',
		params: params,
	});
};
/**
 * 分配商品
 */
export const targetGoodsAdd = (params: object) => {
	return request({
		url: '/admin/target_goods_add',
		method: 'post',
		data: params,
	});
};
/**
 * 查看已绑定商品
 */
export const targetGoods = (params: object) => {
	return request({
		url: '/admin/target_goods',
		method: 'get',
		params: params,
	});
};
/**
 * 查询振兴目标信息
 */
export const targetSelect = (params: object) => {
	return request({
		url: '/admin/target_select',
		method: 'get',
		params: params,
	});
};
/**
 * 编辑振兴目标
 */
export const targetEdit = (params: object) => {
	return request({
		url: '/admin/target_edit',
		method: 'post',
		data: params,
	});
};

/********** 机构管理 **********/
/**
 * 查询用户
 */
export const mechanismSelectUsers = (params: object) => {
	return request({
		url: '/admin/mechanism_select_users',
		method: 'get',
		params: params,
	});
};
/**
 * 选择区域
 */
export const mechanismTargetList = (params: object) => {
	return request({
		url: '/admin/mechanism_target_list',
		method: 'get',
		params: params,
	});
};
/**
 * 添加机构
 */
export const mechanismAdd = (params: object) => {
	return request({
		url: '/admin/mechanism_add',
		method: 'post',
		data: params,
	});
};
/**
 * 机构列表
 */
export const mechanismList = (params: object) => {
	return request({
		url: '/admin/mechanism_list',
		method: 'get',
		params: params,
	});
};

/**
 * 查询机构信息
 */
export const mechanismSelect = (params: object) => {
	return request({
		url: '/admin/mechanism_select',
		method: 'get',
		params: params,
	});
};
/**
 * 编辑机构
 */
export const mechanismEdit = (params: object) => {
	return request({
		url: '/admin/mechanism_edit',
		method: 'post',
		data: params,
	});
};
/********** 机构用户管理 **********/
/**
 * 添加机构用户
 */
export const mechanismUserAdd = (params: object) => {
	return request({
		url: '/admin/mechanism_user_add',
		method: 'post',
		data: params,
	});
};
/**
 * 机构用户列表
 */
export const mechanismUserList = (params: object) => {
	return request({
		url: '/admin/mechanism_user_list',
		method: 'get',
		params: params,
	});
};
/********** 物业公司管理 **********/
/**
 * 添加物业公司
 */
export const propertyAdd = (params: object) => {
	return request({
		url: '/admin/property_add',
		method: 'post',
		data: params,
	});
};
/**
 * 物业公司列表
 */
export const propertyList = (params: object) => {
	return request({
		url: '/admin/property_list',
		method: 'get',
		params: params,
	});
};
/**
 * 查看物流公司基本信息
 */
export const propertySelect = (params: object) => {
	return request({
		url: '/admin/property_select',
		method: 'get',
		params: params,
	});
};
/**
 * 编辑物业公司
 */
export const propertyEdit = (params: object) => {
	return request({
		url: '/admin/property_edit',
		method: 'post',
		data: params,
	});
};
/**
 * 删除物业公司
 */
export const propertyDelete = (params: object) => {
	return request({
		url: '/admin/property_delect',
		method: 'post',
		data: params,
	});
};

/********** 用户管理 **********/
/**
 * 普通用户管理
 */
export const userList = (params: object) => {
	return request({
		url: '/admin/users_list',
		method: 'get',
		params: params,
	});
};
/**
 * 查询物业公司（升级）
 */
export const usersSelectProperty = (params: object) => {
	return request({
		url: '/admin/users_select_property',
		method: 'get',
		params: params,
	});
};
/**
 * 普通用户升级为会员用户
 */
export const usersUpgradation = (params: object) => {
	return request({
		url: '/admin/users_upgradation',
		method: 'post',
		data: params,
	});
};
/**
 * 单位用户管理
 */
export const usersLsitOrganization = (params: object) => {
	return request({
		url: '/admin/users_list_organization',
		method: 'get',
		params: params,
	});
};
/**
 * 查询机构单位
 */
export const usersOrganizationList = (params: object) => {
	return request({
		url: '/admin/users_organization_list',
		method: 'get',
		params: params,
	});
};
/**
 * 物业管家
 */
export const usersAgentList = (params: object) => {
	return request({
		url: '/admin/users_agent_list',
		method: 'get',
		params: params,
	});
};
/**
 * 查询物业单位（搜索）
 */
export const usersPropertyList = (params: object) => {
	return request({
		url: '/admin/users_property_list',
		method: 'get',
		params: params,
	});
};
/**
 * 物业经理
 */
export const usersManagerList = (params: object) => {
	return request({
		url: '/admin/users_manager_list',
		method: 'get',
		params: params,
	});
};
/**
 * 物业管家降级为普通用户
 * @param params 要传的参数值
 * @returns 返回接口数据
 */
export const usersAgentDemotion = (params: object) => {
	return request({
		url: '/admin/users_agent_demotion',
		method: 'post',
		data: params,
	});
};
/**
 * 锁粉历史记录
 */
export const usersFensHistory = (params: object) => {
	return request({
		url: '/admin/users_fens_history',
		method: 'get',
		params: params,
	});
};
/**
 * 用户积分消费记录
 */
export const usersIntegralConsumption = (params: object) => {
	return request({
		url: '/admin/users_integral_consumption',
		method: 'get',
		params: params,
	});
};
/**
 * 用户积分退回记录表
 */
export const usersIntegralReturn = (params: object) => {
	return request({
		url: '/admin/users_integral_return',
		method: 'get',
		params: params,
	});
};
/**
 * 查询当前用户积分
 */
export const usersSelectIntegral = (params: object) => {
	return request({
		url: '/admin/users_select_integral',
		method: 'get',
		params: params,
	});
};
/**
 * 导出用户
 */
export const usersExport = (params: object) => {
	return request({
		url: '/admin/users_export',
		method: 'get',
		params: params,
	});
};

/**
 * 普通用户管理
 */
export const bankUserList = (params: object) => {
	return request({
		url: '/bank/users_list',
		method: 'get',
		params: params,
	});
};
/**
 * 用户积分消费记录
 */
export const bankUsersIntegralConsumption = (params: object) => {
	return request({
		url: '/bank/users_integral_consumption',
		method: 'get',
		params: params,
	});
};
/**
 * 用户积分退回记录表
 */
export const bankUsersIntegralReturn = (params: object) => {
	return request({
		url: '/bank/users_integral_return',
		method: 'get',
		params: params,
	});
};
/**
 * 查询当前用户积分
 */
export const bankUsersSelectIntegral = (params: object) => {
	return request({
		url: '/bank/users_select_integral',
		method: 'get',
		params: params,
	});
};
/**
 * 导出用户
 */
export const bankUsersExport = (params: object) => {
	return request({
		url: '/bank/users_export',
		method: 'get',
		params: params,
	});
};

/********** 单位业绩配置 **********/
/**
 * 选择机构
 */
export const mechanismSelectList = (params: object) => {
	return request({
		url: '/admin/mechanism_select_list',
		method: 'get',
		params: params,
	});
};
/**
 * 添加单位业绩配置
 */
export const mechanismAchievementAdd = (params: object) => {
	return request({
		url: '/admin/mechanism_achievement_add',
		method: 'post',
		data: params,
	});
};
/**
 * 单位业绩配置列表
 */
export const mechanismAchievementList = (params: object) => {
	return request({
		url: '/admin/mechanism_achievement_list',
		method: 'get',
		params: params,
	});
};

/********** 首页统计 **********/
/**
 * 首页平台统计
 */
export const indexPlatform = (params: object) => {
	return request({
		url: '/admin/index_platform',
		method: 'get',
		params: params,
	});
};
/**
 * 首页平台统计-积分
 */
export const indexPlatformIntegral = (params: object) => {
	return request({
		url: '/admin/index_platform_integral',
		method: 'get',
		params: params,
	});
};
/**
 * 平台日统计
 */
export const indexPlatformDate = (params: object) => {
	return request({
		url: '/admin/index_platform_date',
		method: 'get',
		params: params,
	});
};
/**
 * 平台日统计-积分
 */
export const indexPlatformDateIntegral = (params: object) => {
	return request({
		url: '/admin/index_platform_date_integral',
		method: 'get',
		params: params,
	});
};
/**
 * 平台月统计
 */
export const indexPlatformMonth = (params: object) => {
	return request({
		url: '/admin/index_platform_month',
		method: 'get',
		params: params,
	});
};
/**
 * 平台月统计-积分
 */
export const indexPlatformMonthIntegral = (params: object) => {
	return request({
		url: '/admin/index_platform_month_integral',
		method: 'get',
		params: params,
	});
};
/**
 * 平台年统计
 */
export const indexPlatformYear = (params: object) => {
	return request({
		url: '/admin/index_platform_year',
		method: 'get',
		params: params,
	});
};
/**
 * 平台年统计-积分
 */
export const indexPlatformYearIntegral = (params: object) => {
	return request({
		url: '/admin/index_platform_year_integral',
		method: 'get',
		params: params,
	});
};
/**
 * 导出平台日统计
 */
export const indexPlatformDateExport = (params?: object) => {
	return request({
		url: '/admin/index_platform_date_export',
		method: 'get',
		params: params,
	});
};
/**
 * 导出平台日统计-积分
 */
export const indexPlatformDateIntegralExport = (params?: object) => {
	return request({
		url: '/admin/index_platform_date_integral_export',
		method: 'get',
		params: params,
	});
};
/**
 * 导出平台月统计
 */
export const indexPlatformMonthExport = (params?: object) => {
	return request({
		url: '/admin/index_platform_month_export',
		method: 'get',
		params: params,
	});
};
/**
 * 导出平台月统计-积分
 */
export const indexPlatformMonthIntegralExport = (params?: object) => {
	return request({
		url: '/admin/index_platform_month_integral_export',
		method: 'get',
		params: params,
	});
};
/**
 * 导出平台年统计
 */
export const indexPlatformYearExport = (params?: object) => {
	return request({
		url: '/admin/index_platform_year_export',
		method: 'get',
		params: params,
	});
};
/**
 * 导出平台年统计-积分
 */
export const indexPlatformYearIntegralExport = (params?: object) => {
	return request({
		url: '/admin/index_platform_year_integral_export',
		method: 'get',
		params: params,
	});
};
/*
 * 首页统计页面（单个平台）
 */
export const personalStatisticsplatform = (params: object) => {
	return request({
		url: '/admin/personal_statistics_platform',
		method: 'get',
		params: params,
	});
};

/**
 * @method roleList 角色列表
 * @method roleAdd 添加角色
 * @method roleEdit 编辑角色
 * @method roleDelete 删除角色
 */
export const roleApi = () => {
	return {
		roleList: (params?: object) => {
			return request({
				url: '/admin/role_list',
				method: 'get',
				params: params,
			});
		},
		roleAdd: (data?: object) => {
			return request({
				url: '/admin/role_add',
				method: 'post',
				data: data,
			});
		},
		roleEdit: (data?: object) => {
			return request({
				url: '/admin/role_edit',
				method: 'post',
				data: data,
			});
		},
		roleDelete: (data?: object) => {
			return request({
				url: '/admin/role_delete',
				method: 'post',
				data: data,
			});
		},
	};
};

/**
 * @method usersList 用户列表
 * @method usersAdd 添加用户
 * @method usersEdit 编辑用户
 * @method usersDelete 删除用户
 */
export const usersApi = () => {
	return {
		usersList: (params?: object) => {
			return request({
				url: '/admin/admin_list',
				method: 'get',
				params: params,
			});
		},
		usersAdd: (data?: object) => {
			return request({
				url: '/admin/admin_add',
				method: 'post',
				data: data,
			});
		},
		usersEdit: (data?: object) => {
			return request({
				url: '/admin/admin_edit',
				method: 'post',
				data: data,
			});
		},
		usersDelete: (data?: object) => {
			return request({
				url: '/admin/admin_delete',
				method: 'post',
				data: data,
			});
		},
	};
};

/***************字典管理***************/
/**
 * @method dictionariesConfigList 字典列表
 * @method dictionariesConfigAdd 字典添加
 * @method dictionariesConfigEdit 字典编辑
 * @method dictionariesConfigDelete 字典删除
 * @method dictionariesList 字典内容列表
 * @method dictionariesConfigSelect 查看字典
 * @method dictionariesAdd 字典内容添加
 * @method dictionariesEdit 字典内容编辑
 * @method dictionariesDelete 字典内容删除
 */
export const dictionariesApi = () => {
	return {
		dictionariesConfigList: (params?: object) => {
			return request({
				url: '/admin/dictionaries_config_list',
				method: 'get',
				params: params,
			});
		},
		dictionariesConfigAdd: (data?: object) => {
			return request({
				url: '/admin/dictionaries_config_add',
				method: 'post',
				data: data,
			});
		},
		dictionariesConfigEdit: (data?: object) => {
			return request({
				url: '/admin/dictionaries_config_edit',
				method: 'post',
				data: data,
			});
		},
		dictionariesConfigDelete: (data?: object) => {
			return request({
				url: '/admin/dictionaries_config_delect',
				method: 'post',
				data: data,
			});
		},
		dictionariesList: (params?: object) => {
			return request({
				url: '/admin/dictionaries_list',
				method: 'get',
				params: params,
			});
		},
		dictionariesConfigSelect: (params?: object) => {
			return request({
				url: '/admin/dictionaries_config_select',
				method: 'get',
				params: params,
			});
		},
		dictionariesAdd: (data?: object) => {
			return request({
				url: '/admin/dictionaries_add',
				method: 'post',
				data: data,
			});
		},
		dictionariesEdit: (data?: object) => {
			return request({
				url: '/admin/dictionaries_edit',
				method: 'post',
				data: data,
			});
		},
		dictionariesDelete: (data?: object) => {
			return request({
				url: '/admin/dictionaries_delect',
				method: 'post',
				data: data,
			});
		},
	};
};

/****************优惠券****************/
/**
 * @method couponList 优惠券列表
 * @method couponGoodsList 商品列表
 * @method couponAdd 添加优惠券
 * @method couponEdit 编辑优惠券
 * @method couponGoods 查询优惠券绑定的商品
 * @method couponDelete 删除优惠券
 * @method couponEditStock 设置优惠券的库存
 * @method couponEmpty 清空优惠券领取记录
 * @method couponGrant 手动发放优惠券
 * @method couponUseList 优惠券使用记录
 * @method couponUseExport 导出优惠券使用记录
 * @method couponImportList 查看优惠券发放人员导入记录
 * @method couponImportExport 导出优惠券发放人员导入记录
 * @method couponGrantList 优惠券领取记录
 */
export const couponApi = () => {
	return {
		couponList: (params?: object) => {
			return request({
				url: '/admin/coupon_list',
				method: 'get',
				params: params,
			});
		},
		couponGoodsList: (params?: object) => {
			return request({
				url: '/admin/coupon_goods_list',
				method: 'get',
				params: params,
			});
		},
		couponAdd: (data?: object) => {
			return request({
				url: '/admin/coupon_add',
				method: 'post',
				data: data,
			});
		},
		couponGoods: (params?: object) => {
			return request({
				url: '/admin/coupon_goods',
				method: 'get',
				params: params,
			});
		},
		couponEdit: (data?: object) => {
			return request({
				url: '/admin/coupon_edit',
				method: 'post',
				data: data,
			});
		},
		couponDelete: (data?: object) => {
			return request({
				url: '/admin/coupon_delete',
				method: 'post',
				data: data,
			});
		},
		couponEditStock: (data?: object) => {
			return request({
				url: '/admin/coupon_edit_stock',
				method: 'post',
				data: data,
			});
		},
		couponEmpty: (data?: object) => {
			return request({
				url: '/admin/coupon_empty',
				method: 'post',
				data: data,
			});
		},
		couponGrant: (data?: object) => {
			return request({
				url: '/admin/coupon_grant',
				method: 'post',
				data: data,
			});
		},
		couponUseList: (params?: object) => {
			return request({
				url: '/admin/coupon_use_list',
				method: 'get',
				params: params,
			});
		},
		couponUseExport: (params?: object) => {
			return request({
				url: '/admin/coupon_use_export',
				method: 'get',
				params: params,
			});
		},
		couponImportList: (params?: object) => {
			return request({
				url: '/admin/coupon_import_list',
				method: 'get',
				params: params,
			});
		},
		couponImportExport: (params?: object) => {
			return request({
				url: '/admin/coupon_import_export',
				method: 'get',
				params: params,
			});
		},
		couponGrantList: (params?: object) => {
			return request({
				url: '/admin/coupon_grant_list',
				method: 'get',
				params: params,
			});
		},
	};
};
/**
 * @method couponList 充值金额
 * @method userRechargeList 用户充值记录
 * @method userRechargeImport 导入用户充值
 */
export const userApi = () => {
	return {
		userRecharge: (data?: object) => {
			return request({
				url: '/admin/user_recharge',
				method: 'post',
				data: data,
			});
		},
		userRechargeImport: (data?: object) => {
			return request({
				url: '/admin/user_recharge_import',
				method: 'post',
				data: data,
			});
		},
		userRechargeList: (params?: object) => {
			return request({
				url: '/admin/user_recharge_list',
				method: 'get',
				params: params,
			});
		},
	};
};
/**
 * @method tagsList 商品标签列表
 * @method tagsAdd 商品标签添加
 * @method tagsEdit 商品标签编辑
 * @method tagsDelete 商品标签删除
 */
export const tagsApi = () => {
	return {
		tagsList: (params?: object) => {
			return request({
				url: '/admin/tags_list',
				method: 'get',
				params: params,
			});
		},
		tagsAdd: (data?: object) => {
			return request({
				url: '/admin/tags_add',
				method: 'post',
				data: data,
			});
		},
		tagsEdit: (data?: object) => {
			return request({
				url: '/admin/tags_edit',
				method: 'post',
				data: data,
			});
		},
		tagsDelete: (data?: object) => {
			return request({
				url: '/admin/tags_delete',
				method: 'post',
				data: data,
			});
		},
	};
};
/**
 * @method orderSelectGoods 选择商品（搜索）
 */
export const orderApi = () => {
	return {
		goodsSelect: (params?: object) => {
			return request({
				url: '/admin/order_select_goods',
				method: 'get',
				params: params,
			});
		},
	};
};
/**
 * @method supplierList 供应商列表
 * @method supplierSelect 查询供应商
 */
export const supplierApi = () => {
	return {
		supplierList: (params?: object) => {
			return request({
				url: '/admin/supplier_list',
				method: 'get',
				params: params,
			});
		},
		supplierSelect: (params?: object) => {
			return request({
				url: '/admin/supplier_select',
				method: 'get',
				params: params,
			});
		},
	};
};
/**
 * @method supplierWithdrawalList 供应商提现记录
 * @method supplierWithdrawalPaymentList 供应商货款打款列表
 * @method applyPaymentOrderList 结算订单信息【待审核和已通过】
 * @method applyPaymentOrderListRefuse 结算订单信息【已拒绝】
 * @method supplierWithdrawalPaymentExamine 审核供应商货款打款
 * @method supplierWithdrawalExamine 审核供应商货款
 * @method supplierRepayment 重新打款
 */
export const supplierWithdrawalApi = () => {
	return {
		supplierWithdrawalList: (params?: object) => {
			return request({
				url: '/admin/supplier_withdrawal_list',
				method: 'get',
				params: params,
			});
		},
		supplierWithdrawalPaymentList: (params?: object) => {
			return request({
				url: '/admin/supplier_withdrawal_payment_list',
				method: 'get',
				params: params,
			});
		},
		applyPaymentOrderList: (params?: object) => {
			return request({
				url: '/admin/apply_payment_order_list',
				method: 'get',
				params: params,
			});
		},
		applyPaymentOrderListRefuse: (params?: object) => {
			return request({
				url: '/admin/apply_payment_order_list_refuse',
				method: 'get',
				params: params,
			});
		},
		supplierWithdrawalPaymentExamine: (params?: object) => {
			return request({
				url: '/admin/supplier_withdrawal_payment_examine',
				method: 'post',
				data: params,
			});
		},
		supplierWithdrawalExamine: (params?: object) => {
			return request({
				url: '/admin/supplier_withdrawal_examine',
				method: 'post',
				data: params,
			});
		},
		supplierRepayment: (params?: object) => {
			return request({
				url: '/admin/supplier_repayment',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method livesMemberList 直播成员列表
 * @method addLivesMember 添加直播成员
 * @method deleteLivesMember 删除直播成员
 * @method livesList 直播间列表
 * @method addLives 添加直播间
 * @method editLives 编辑直播间
 * @method deleteLives 删除直播间
 * @method livesGoodsList 直播商品列表
 * @method selectLivesGoodsList 获取可选择提审的商品列表
 * @method livesGoodsListApply 提交商品审核
 * @method livesGoodsListDelete 删除商品
 * @method livesGoodsList1 获取可导入直播间的商品列表
 * @method livesListAddGoods 直播间导入选中的商品
 */
export const livesApi = () => {
	return {
		livesMemberList: (params?: object) => {
			return request({
				url: '/admin/lives_member_list',
				method: 'get',
				params: params,
			});
		},
		addLivesMember: (params?: object) => {
			return request({
				url: '/admin/add_lives_member',
				method: 'post',
				data: params,
			});
		},
		deleteLivesMember: (params?: object) => {
			return request({
				url: '/admin/delete_lives_member',
				method: 'post',
				data: params,
			});
		},
		livesList: (params?: object) => {
			return request({
				url: '/admin/lives_list',
				method: 'get',
				params: params,
			});
		},
		addLives: (params?: object) => {
			return request({
				url: '/admin/add_lives',
				method: 'post',
				data: params,
			});
		},
		editLives: (params?: object) => {
			return request({
				url: '/admin/edit_lives',
				method: 'post',
				data: params,
			});
		},
		deleteLives: (params?: object) => {
			return request({
				url: '/admin/delete_lives',
				method: 'post',
				data: params,
			});
		},
		livesGoodsList: (params?: object) => {
			return request({
				url: '/admin/lives_goods_list',
				method: 'get',
				params: params,
			});
		},
		selectLivesGoodsList: (params?: object) => {
			return request({
				url: '/admin/select_lives_goods_list',
				method: 'get',
				params: params,
			});
		},
		livesGoodsListApply: (params?: object) => {
			return request({
				url: '/admin/lives_goods_list_apply',
				method: 'post',
				data: params,
			});
		},
		livesGoodsListDelete: (params?: object) => {
			return request({
				url: '/admin/lives_goods_list_delete',
				method: 'post',
				data: params,
			});
		},
		livesGoodsList1: (params?: object) => {
			return request({
				url: '/admin/lives_goods_list1',
				method: 'get',
				params: params,
			});
		},
		livesListAddGoods: (params?: object) => {
			return request({
				url: '/admin/lives_list_add_goods',
				method: 'post',
				data: params,
			});
		}
	};
};
/**
 * @method login 供应商登录
 * @method supplierWithdrawalList 供应商提现记录
 * @method mySupplierMoneyPayment 我的货款信息
 * @method applyPaymentOrderList 结算订单信息【待审核和已通过】
 * @method applyPaymentOrderListRefuse 结算订单信息【已拒绝】
 * @method goodsSelect 搜索商品
 * @method withdrawalOrders 货款提现订单
 * @method orderSelectedPaymentHlb 选中订单的货款信息【合利宝】
 * @method orderSelectedPaymentOther 选中订单的货款信息【其他】
 * @method applyPaymentHlb 合利宝申请提现
 * @method applyPaymentOther 其他支付申请提现
 * @method supplierWithdrawalPaymentList 已提现货款记录
 * @method applySupplierWithdrawalPayment 申请打款【获取资料】
 * @method confirmSupplierWithdrawalPayment 确认打款
 */
export const supplier1Api = () => {
	return {
		login: (params?: object) => {
			return request({
				url: '/supplier/login',
				method: 'post',
				data: params,
			});
		},
		supplierWithdrawalList: (params?: object) => {
			return request({
				url: '/supplier/supplier_withdrawal_list',
				method: 'get',
				params: params,
			});
		},
		mySupplierMoneyPayment: (params?: object) => {
			return request({
				url: '/supplier/my_supplier_money_payment',
				method: 'get',
				params: params,
			});
		},
		applyPaymentOrderList: (params?: object) => {
			return request({
				url: '/supplier/apply_payment_order_list',
				method: 'get',
				params: params,
			});
		},
		applyPaymentOrderListRefuse: (params?: object) => {
			return request({
				url: '/supplier/apply_payment_order_list_refuse',
				method: 'get',
				params: params,
			});
		},
		goodsSelect: (params?: object) => {
			return request({
				url: '/supplier/goods_select',
				method: 'get',
				params: params,
			});
		},
		withdrawalOrders: (params?: object) => {
			return request({
				url: '/supplier/withdrawal_orders',
				method: 'get',
				params: params,
			});
		},
		orderSelectedPaymentHlb: (params?: object) => {
			return request({
				url: '/supplier/order_selected_payment_hlb',
				method: 'get',
				params: params,
			});
		},
		orderSelectedPaymentOther: (params?: object) => {
			return request({
				url: '/supplier/order_selected_payment_other',
				method: 'get',
				params: params,
			});
		},
		applyPaymentHlb: (params?: object) => {
			return request({
				url: '/supplier/apply_payment_hlb',
				method: 'post',
				data: params,
			});
		},
		applyPaymentOther: (params?: object) => {
			return request({
				url: '/supplier/apply_payment_other',
				method: 'post',
				data: params,
			});
		},
		supplierWithdrawalPaymentList: (params?: object) => {
			return request({
				url: '/supplier/supplier_withdrawal_payment_list',
				method: 'get',
				params: params,
			});
		},
		applySupplierWithdrawalPayment: (params?: object) => {
			return request({
				url: '/supplier/apply_supplier_withdrawal_payment',
				method: 'get',
				params: params,
			});
		},
		confirmSupplierWithdrawalPayment: (params?: object) => {
			return request({
				url: '/supplier/confirm_supplier_withdrawal_payment',
				method: 'post',
				data: params,
			});
		},
	};
};
/**
 * @method withdrawalToBeReviewed 待审核
 * @method withdrawalPaymentApproved 打款中
 * @method withdrawalAuditRejection 审核拒绝
 * @method withdrawalApproved 完成
 * @method withdrawalExamineBatch 审核 - 转账
 * @method withdrawalPaymentBatch 审核 - 打款
 * @method withdrawalBalance 查询可提现金额
 */
export const withdrawalApi = () => {
	return {
		withdrawalToBeReviewed: (params?: object) => {
			return request({
				url: '/admin/withdrawal_to_be_reviewed',
				method: 'get',
				params: params,
			});
		},
		withdrawalPaymentApproved: (params?: object) => {
			return request({
				url: '/admin/withdrawal_payment_approved',
				method: 'get',
				params: params,
			});
		},
		withdrawalAuditRejection: (params?: object) => {
			return request({
				url: '/admin/withdrawal_audit_rejection',
				method: 'get',
				params: params,
			});
		},
		withdrawalApproved: (params?: object) => {
			return request({
				url: '/admin/withdrawal_approved',
				method: 'get',
				params: params,
			});
		},
		withdrawalExamineBatch: (params?: object) => {
			return request({
				url: '/admin/withdrawal_examine_batch',
				method: 'post',
				data: params,
			});
		},
		withdrawalPaymentBatch: (params?: object) => {
			return request({
				url: '/admin/withdrawal_payment_batch',
				method: 'post',
				data: params,
			});
		},
		withdrawalBalance: (params?: object) => {
			return request({
				url: '/admin/withdrawal_balance',
				method: 'get',
				params: params,
			});
		},
	};
};
